<template>
  <!-- 卡片列表 -->
  <el-row :gutter="20">
    <el-col :span="6" v-for="(item, i) in card" :key="item.id">
      <div class="grid-content">
        <i :style="{ color: arr[i] }" class="iconfont" :class="item.icon"></i>
        <p>
          <span>{{ item.text }}</span>
          <b>{{ item.num }}</b>
        </p>
      </div>
    </el-col>
  </el-row>
</template>

<script>
export default {
  props: {
    card: {
      type: Array,
      default: () => []
    },
    arr: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="less" scoped>
.el-row {
  margin-bottom: 20px;
  &:last-child {
    margin-bottom: 0;
  }
}
.el-col {
  border-radius: 4px;
}
.grid-content {
  background: #ffffff;
  border-radius: 4px;
  padding: 10px 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  .iconfont {
    font-size: 40px;
  }
  span,
  b {
    display: block;
    text-align: center;
  }
  span {
    color: #999;
  }
  b {
    font-size: 14px;
  }
}
</style>
